function createPolygon(cxt,n,dx,dy,size){
    cxt.beginPath();
    let degree = (2*Math.PI)/n
    for(let i=0;i<n;i++){
        let x = Math.cos(i*degree)
        let y = Math.sin(i*degree)
        cxt.lineTo(x*size+dx, y*size+dy);
        
    }
    cxt.closePath();   
}